package top.meeting.room.common.exceptions;

import top.meeting.room.common.constant.ResultEnum;

/**
 * 我有故事，你有酒么？
 * JKhaled created by yunqisong@foxmail.com 2017/7/22
 * FOR : 可捕获异常
 */
public class HandlerException extends RuntimeException{

    public HandlerException(String message) {
        super(message);
        this.code = code;
    }

    public HandlerException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public HandlerException(ResultEnum resultEnum, String extMsg) {
        super(resultEnum.getMsg() + ": " + extMsg);
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    private Integer code;

}
